package indi.kider.server.apabus.service;


import indi.kider.common.model.apabus.*;
import pers.vankid.common.utils.page.PageRequest;
import pers.vankid.common.utils.page.PageResponse;

import java.util.List;

public interface ApabusService {

    boolean hasRent(Long housesId);

    /**
     * 承租人租房
     *VARCHAR
     * @param rent
     * @return
     */
    Rent rentHouses(RentVo rent)throws Exception;
    Rent rentHouseForImport(RentVo rent)throws Exception;

    /**
     * 承租人退房
     *
     * @param housesId
     * @param tenantId
     * @param rentId
     * @return
     */
    void rentHouses(Long housesId, Long tenantId, Long rentId) throws Exception;

    /**
     * 企业承租人租房\
     *
     * @param housesIds
     * @param enterpriseId
     * @param employeeId
     * @return
     */
    int rentHousesToContract(List<Long> housesIds, Long enterpriseId, Long employeeId);

    /**
     * 企业承租人退房
     *
     * @param housesIds
     * @param enterpriseId
     * @return
     */
    int rentHousesToContract(List<Long> housesIds, Long enterpriseId);

    /**
     * 租房人的服务
     *
     * @param rentId
     * @param busType
     * @param busdeis  问题说明
     * @return
     */
    void rentBusSubmit(Integer busType, String busdeis, Long rentId, Long waiterId) ;


    /**
     * 派工
     *
     * @param dispatch
     * @return
     */
    int dispatch(Dispatch dispatch);

    /**
     * 派工
     *
     * @param busId
     * @param waiterId
     * @return
     */
    int dispatch(Long busId, Long waiterId);

    /**
     * 工单完成提交
     *
     * @param busId
     * @param result
     * @return
     */
    int dispatch(Long busId, String result);
    /**
     * 工单完成提交
     *
     * @param completeBean
     * @return
     */
    int complete(CompleteBean completeBean);

    /**
     * 评价
     *
     * @param busId
     * @param evaluation
     * @param evsu
     * @return
     */
    int busEvsu(Long busId, int evaluation, String evsu);

    /**
     * 逻辑删除服务
     * @param busId
     */
    void delBus(Long busId,Integer delState);
    /**
     * 获取服务列表
     *
     * @param request
     * @return
     */
    PageResponse<List<Bus>> queryBusList(PageRequest<Bus> request);

    /**
     * 根据ID获取租房信息
     * @return
     */
    Rent getRentById(Long id);
    /**
     * 根据房屋ID获取租房信息
     * @return
     */
    Rent getRentByHouseId(Long id);

    HouseCount queryHouseCount(Long loginId);

    RentOutline insertRentOutLine(RentOutline rentOutline);


    int updateReport();

    List<RentMonthReport> getReportByMonth(String month, String phone);

    RentMonthReport getReportByNow(String phone);

    /**
     * 续租房屋
     */
    void reletHouse(Relet relet) throws Exception;

    /**
     * 发布状态
     *
     * @param id
     * @param release
     */
    void release(Long id, Integer release);

}
